The main system of the component. More...
Public Member Functions | |
| bool | initialize () |
| bool | createDefaultTheme () const |
| WindowingSystem * | getWindowingSystem () const |
| bool | isInitialized () const |
| runRoutine | getRunCallback () const |
| void | setRunCallback (runRoutine callback) |
| void | run () |
| void | tick () |
| void | prepareForShutdown () |
| void | shutdown () |
| void | notifyEvent () |
The main system of the component.
Used to boot the component, and then automate some functionalities like the program loop.
| bool nkWinUi::MainSystem::initialize | ( | ) |
Initialization of the component. Has to be called before being able to use the component.
| bool nkWinUi::MainSystem::createDefaultTheme | ( | ) | const |
Creates the default theme. Part of the initialization routine.
| WindowingSystem* nkWinUi::MainSystem::getWindowingSystem | ( | ) | const |
Returns the windowing system active. Currently not exposed.
| bool nkWinUi::MainSystem::isInitialized | ( | ) | const |
| runRoutine nkWinUi::MainSystem::getRunCallback | ( | ) | const |
| void nkWinUi::MainSystem::setRunCallback | ( | runRoutine | callback | ) |
Sets the callback for the running loop. This callback is called when the run() function is used, whenever the loop has done a tick.
| callback | The callback to use. |
| void nkWinUi::MainSystem::run | ( | ) |
Enters the running loop, until the program is ended.
| void nkWinUi::MainSystem::tick | ( | ) |
If the running loop has to be run by external code, this function can be called within that function to tick the windowing system. Ticking comprises event handling, for instance.
| void nkWinUi::MainSystem::prepareForShutdown | ( | ) |
Prepares the component for shutdown. Has to be calkled before shutdown().
| void nkWinUi::MainSystem::shutdown | ( | ) |
Shuts the component, typically when the program ends.
| void nkWinUi::MainSystem::notifyEvent | ( | ) |
Fire an empty message to force an event down the system. Can be used in the running context to force a tick to occur, as depending on the windowing system it can wait for events before ticking.